using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;

namespace FlowerShop.Core.Models
{
    public partial class Model1 : DbContext
    {
        public Model1()
            : base("name=Model11")
        {
        }

        public virtual DbSet<t_user> t_user { get; set; }
        public virtual DbSet<Tgood> Tgood { get; set; }
        public virtual DbSet<Torder> Torder { get; set; }
        public virtual DbSet<Tpeople> Tpeople { get; set; }
        public virtual DbSet<Tshoppingcars> Tshoppingcars { get; set; }
        public virtual DbSet<Twoker> Twoker { get; set; }

       
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Entity<Torder>()
                .Property(e => e.O_profit)
                .HasPrecision(10, 2);

            modelBuilder.Entity<Tpeople>()
                .Property(e => e.email)
                .IsFixedLength();

            modelBuilder.Entity<Tpeople>()
                .Property(e => e.Image)
                .IsUnicode(false);

            modelBuilder.Entity<Twoker>()
                .Property(e => e.Image)
                .IsUnicode(false);
        }
    }
}
